package org.grow.loginto.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.core.GrantedAuthority;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * @Author: xwg
 * @CreateDate: 21-6-14
 */
@Data
@Entity
public class RoleInfo implements GrantedAuthority {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer roleId;
    private String roleName;
    private String roleText;
    private String description="简要的角色权限描述";
    @JsonIgnore
    @Override
    public String getAuthority() {
        return this.roleName;
    }
//    @JsonIgnore
//    @Override
//    public String getAttribute() {
//        return this.roleName;
//    }
}
